
package com.platform.modules.mall.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.platform.modules.mall.entity.MallOrderEntity;
import com.platform.modules.mall.entity.MallOrderGoodsEntity;
import com.platform.modules.mall.entity.MallUserCardEntity;

import java.util.List;
import java.util.Map;

/**
 * 订单详情Service接口
 *
 * @author 
 * @date 2019-07-05 19:29:18
 */
public interface MallOrderGoodsService extends IService<MallOrderGoodsEntity> {

    /**
     * 查询所有列表
     *
     * @param params 查询参数
     * @return List
     */
    List<MallOrderGoodsEntity> queryAll(Map<String, Object> params);

    /**
     * 分页查询订单详情
     *
     * @param params 查询参数
     * @return Page
     */
    Page queryPage(Map<String, Object> params);

    /**
     * 新增订单详情
     *
     * @param mallOrderGoods 订单详情
     * @return 新增结果
     */
    boolean add(MallOrderGoodsEntity mallOrderGoods);

    /**
     * 根据主键更新订单详情
     *
     * @param mallOrderGoods 订单详情
     * @return 更新结果
     */
    boolean update(MallOrderGoodsEntity mallOrderGoods);

    /**
     * 根据主键删除订单详情
     *
     * @param id id
     * @return 删除结果
     */
    boolean delete(String id);

    /**
     * 根据主键批量删除
     *
     * @param ids ids
     * @return 删除结果
     */
    boolean deleteBatch(String[] ids);

    MallOrderGoodsEntity queryUserBuyNumber(MallOrderGoodsEntity orderGoodsEntity);

    /**
     * 查询购买数据
     *
     * @param userCardEntity
     * @return
     */
    MallOrderEntity queryUserRecord(MallUserCardEntity userCardEntity);

    MallOrderGoodsEntity querySumMarketPrice(String orderId);
}
